package FriendTable.Gui;
/*
更新A
 */
import javax.swing.*;
import java.awt.*;

public class InputPanel extends JPanel {
    public JTextField textField;
    public JComboBox<String> comboBox;

    public InputPanel(String labelText, String[] comboBoxItems) {
        setLayout(new FlowLayout());

        JLabel label = new JLabel(labelText);
        add(label);

        textField = new JTextField(20);
        add(textField);

        if (comboBoxItems != null) {
            comboBox = new JComboBox<>(comboBoxItems);
            add(comboBox);
        }
    }
}